#ifndef _VN_ANIMATION_MANAGER_H_
#define _VN_ANIMATION_MANAGER_H_

#include <vector>
#include "..\Graphics\Sprite.h"
#include "..\Graphics\Animation.h"
#include "..\Generic\GameTime.h"

namespace vn
{
	class AnimationManager
	{
	public:
		AnimationManager(vn::Sprite* p_sprite);
		AnimationManager(void);
		virtual ~AnimationManager(void);

		void setSprite(vn::Sprite* p_sprite) { m_sprite = p_sprite; }
		void update(const GameTime&);
		void loadAnimations(const std::string& p_filepath);
		void setAnimation(const std::string& p_animID);
		const std::string& getCurrentID() { return m_currentAnimation->getID(); }
		const bool isDone() { return m_currentAnimation->isDone(); }
		void setNextAnimation(const std::string& p_animID, const std::string& p_nextAnimID);

	private:
		vn::Sprite* m_sprite;
		vn::Animation* m_currentAnimation;
		std::vector<vn::Animation*> m_animations;

	};
}

#endif // _VN_ANIMATION_MANAGER_H_